package com.itheima.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/checkitem")
public class CheckItemController {


    @RequestMapping("/add")
    @PreAuthorize("hasAuthority('checkitem_add')")
    public String add(){
        System.out.println("add");
        return  "add";
    }

    @RequestMapping("/delete")
    @PreAuthorize("hasAuthority('checkitem_del')")
     public String deleted(){
         System.out.println("deleted");
         return "deleted";
     }

}
